home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 401-425 / disk_419 / yacc / src.lzh / Src / yacc.doc < prev   
Text File  |  1990-07-14  |  4KB  |  133 lines

  1.  
  2.  
  3.  
  4. YACC(1)                   USER COMMANDS                   YACC(1)
  5.  
  6.  
  7.  
  8. NAME
  9.      Yacc - an LALR(1) parser generator
  10.  
  11. SYNOPSIS
  12.      yacc [ -dlrtv ] [ -b prefix ] filename
  13.  
  14. DESCRIPTION
  15.      Yacc reads the grammar specification in  the  file  filename
  16.      and  generates  an LR(1) parser for it.  The parsers consist
  17.      of a set of LALR(1) parsing  tables  and  a  driver  routine
  18.      written in the C programming language.  Yacc normally writes
  19.      the parse tables and the driver routine to the file y.tab.c.
  20.  
  21.      The following options are available:
  22.  
  23.           -b prefix
  24.                The -b option changes the prefix prepended to  the
  25.                output file names to the string denoted by prefix.
  26.                The default prefix is the character y.
  27.  
  28.           -d   The -d option causes the header file y.tab.h to be
  29.                written.
  30.  
  31.           -l   If the -l  option  is  not  specified,  yacc  will
  32.                insert  #line  directives  in  the generated code.
  33.                The #line directives let  the  C  compiler  relate
  34.                errors  in the generated code to the user's origi-
  35.                nal code.  If the -l  option  is  specified,  yacc
  36.                will  not  insert  the  #line  directives.   #line
  37.                directives specified by the user will be retained.
  38.  
  39.           -r   The -r option  causes  yacc  to  produce  separate
  40.                files for code and tables.  The code file is named
  41.                 y.code.c, and the tables file is  named  y.tab.c.
  42.                (The -r option has not yet been implemented.)
  43.  
  44.           -t   The -t option changes the preprocessor  directives
  45.                generated  by  yacc  so  that debugging statements
  46.                will be incorporated in the compiled code.
  47.  
  48.           -v   The -v option causes a human-readable  description
  49.                of  the generated parser to be written to the file
  50.                y.output.
  51.  
  52.      If the  environment  variable  TMPDIR  is  set,  the  string
  53.      denoted  by TMPDIR will be used as the name of the directory
  54.      where the temporary files are created.
  55.  
  56. TABLES
  57.      There is a program :yyfix that extracts  tables  from  yacc-
  58.      generated  files.  The program takes the names of the tables
  59.      as its command-line arguments.   The  names  of  the  tables
  60.  
  61.  
  62.  
  63. Sun Release 3.5     Last change: June 3, 1990                   1
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. YACC(1)                   USER COMMANDS                   YACC(1)
  71.  
  72.  
  73.  
  74.      generated   by  this  version  of  yacc  are  yylhs,  yylen,
  75.      yydefredyydgotoyysindex,  yyrindex,  yygindex,  yytable,
  76.      and  yycheck.  Two additional tables, yyname and yyrule, are
  77.      created if YYDEBUG is defined and nonzero.
  78.  
  79. FILES
  80.      y.tab.c
  81.      y.tab.h
  82.      y.output
  83.      /tmp/yacc.aXXXXXX
  84.      /tmp/yacc.tXXXXXX
  85.      /tmp/yacc.uXXXXXX
  86.  
  87. DIAGNOSTICS
  88.      If there are rules that are never  reduced,  the  number  of
  89.      such  rules is reported on standard error.  If there are any
  90.      LALR(1) conflicts, the number of conflicts  is  reported  on
  91.      standard error.
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129. Sun Release 3.5     Last change: June 3, 1990                   2
  130.  
  131.  
  132.  
  133.